#include<cstdio>
#include<cstring>
const int maxn=16;
const int INF=0xfffffff;
int area[maxn][maxn],state[maxn][maxn],dp[1<<15];
int x[maxn],y[maxn],n;
int min(int x,int y){return x<y?x:y;}
int max(int x,int y){return x>y?x:y;}
int abs(int x){return x>0?x:-x;}
bool iscov(int a,int b,int c)
{
	if(x[c]>=min(x[a],x[b])&&x[c]<=max(x[a],x[b])&&
	   y[c]>=min(y[a],y[b])&&y[c]<=max(y[a],y[b]))
		return true;
	return false;
}
void init()
{
	for(int i=1;i<n;i++)
		for(int j=i+1;j<=n;j++)
		{
			int s=0;
			area[i][j]=abs(x[i]-x[j])*abs(y[i]-y[j]);
			if(y[i]==y[j])area[i][j]=abs(x[i]-x[j]);
			if(x[i]==x[j])area[i][j]=abs(y[i]-y[j]);
			for(int k=1;k<=n;k++)
				if(iscov(i,j,k))s=s+(1<<(k-1));
			state[i][j]=s;
		}
}
int main()
{
	while(scanf("%d",&n)&&n)
	{
		for(int i=1;i<=n;i++)
			scanf("%d%d",&x[i],&y[i]);
		init();
		int st=(1<<n)-1;
		for(int i=1;i<=st;i++)dp[i]=INF;
		dp[0]=0;
		for(int s=0;s<=st;s++)
			for(int i=1;i<n;i++)
				for(int j=1;j<=n;j++)
				if((s&state[i][j])!=state[i][j])
					dp[s+state[i][j]-(s&state[i][j])]=min(dp[s+state[i][j]-(s&state[i][j])],dp[s]+area[i][j]);
		printf("%d\n",dp[st]);
	}
	return 0;
}

		

